<?php

namespace App\Model\CommodityModel;
use App\Model\BaseModel\BaseCommodityModel;
use Hyperf\DbConnection\Db;

class Tag extends BaseCommodityModel
{
    public $table = 'tag_s2b';
    
    /**
     * 获取标签列表
     */
    public function getTagListByTagIDs( array $ids = [] ) 
    {
        return $this->select([
            Db::raw('CONCAT(ID,"") AS ID'),
            'Name',
            'Description'
        ])
        ->whereIn('ID',$ids)
        ->get()
        ->toArray();
    }
}
